<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" 
      xmlns:th="http://www.thymeleaf.org"
      layout:decorate="~{layout}">

<head>
    <title>登录成功</title>
    <meta charset="UTF-8">
</head>

<body id="cas">
<div layout:fragment="content">
    <div class="alert alert-success">
        <h2>欢迎！登录成功</h2>
        <p th:if="${principal != null and principal.id != null}">
            用户名：<span th:text="${principal.id}"></span>
        </p>
        <p th:unless="${principal != null and principal.id != null}">
            登录成功！
        </p>
        <p>登录时间：<span th:text="${#dates.format(#dates.createNow(), 'yyyy-MM-dd HH:mm:ss')}"></span></p>
        
        <!-- 可以添加你的应用链接 -->
        <div style="margin-top: 20px;">
            <a href="http://192.168.66.164:8443/cas?service=http://192.168.66.164:5173" 
               target="_blank" 
               class="btn btn-primary" 
               style="margin-right: 10px;">应用1</a>
            <a href="http://192.168.66.164:8443/cas?service=http://192.168.66.164:5174" 
               target="_blank" 
               class="btn btn-primary" 
               style="margin-right: 10px;">应用2</a>
            <a href="/cas/logout" class="btn btn-default">退出登录</a>
        </div>
    </div>
</div>
</body>
</html>